<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login</title>
<link rel="stylesheet"
	href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
<link rel="stylesheet"
	href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/htmleaf-demo.css">
<body>


 <form class="contact">
			
								<input type="text" placeholder="用户名"> 
		
								<input type="password" placeholder="密　码">
 </form>
 </div>
      <div class="modal-footer">
          <button class="btn btn-success" id="submit">submit</button>
          <a href="#" class="btn" data-dismiss="modal">Close</a>
   </div>
 </div>
</body>

<script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.js"></script>
<script>
 $(function() {
//twitter bootstrap script
	$("button#submit").click(function(){
	        $.ajax({
    		type: "POST",
		url: "process.php",
		data: $('form.contact').serialize(),
        	success: function(msg){
 	                $("#thanks").html(msg)
 		       	$("#form-content").modal('hide');	
 		        },
		error: function(){
			alert("failure");
			}
      		});
	});
});
</script>

</html>